package com.example.perplonews.a_d_fragment.b_perplo.adapter

import android.graphics.Color
import androidx.constraintlayout.widget.Placeholder
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestOptions
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.perplonews.R
import com.example.perplonews.a_b_utils.LjlUtils
import com.example.perplonews.a_d_fragment.c_video.entity.Data
import com.example.perplonews.a_d_fragment.c_video.entity.SmallVideo

class Perplo_Rec_Adapter (list:ArrayList<Data>):BaseQuickAdapter<Data,BaseViewHolder>(R.layout.preplo_item,list) {




    override fun convert(helper: BaseViewHolder, item: Data) {
        if (item.isclick){
            helper.setText(R.id.per_tex,item.title).setTextColor(R.id.per_tex,-0x999999)
            helper.setText(R.id.per_data,item.author_name+"  "+item.date)
            Glide.with(mContext).load(item.thumbnail_pic_s).into(helper.getView(R.id.per_img))

        }else{
            helper.setText(R.id.per_tex,item.title).setTextColor(R.id.per_tex,Color.BLACK)
            helper.setText(R.id.per_data,item.author_name+"  "+item.date)
            Glide.with(mContext)
                .load(item.thumbnail_pic_s)
                .into(helper.getView(R.id.per_img))
        }


    }
}